{% load i18n themes posttags render%}
{% theme_extends "base.html" %}
{% block title %}{{post.title}} - {{ block.super }} {% endblock %}
{% block meta %}<meta content="{{post.title}},Pylogs,基于Python的博客系统" name="keywords"/>
<meta name="description" content="{{post.content|striptags|truncatewords_html:30}}"/>{%endblock%}
{% block script %}<script language="javascript" type="text/javascript" src="{%media_url%}/js/jquery-1.2.3.pack.js" ></script>
{%endblock%}
{% block content %}
<!--Start of content-->
 <div class="post">
      <h2>
        <a href="{{post.get_absolute_url}}">{{post.title}}</a>
      </h2>
    <small>{% trans "Pubdate" %}:<abbr title="post time">{{post.pubdate|date:"Y-m-d H:i:s"}}</abbr>
    &nbsp;&nbsp;<!--Categories--> {%trans "Categories" %}:
    {% for cat in post.category.all %}
    <a href="{{cat.get_absolute_url}}" rel="category tag">{{cat.name}}</a>{% if not forloop.last %},{% endif %}
    {% endfor %}&nbsp;&nbsp;
    {{post.hits}} {% trans "Views" %}&nbsp;&nbsp;
    <a href="{{post.get_absolute_url}}#newcomments">{{post.comment_count}} {% trans "Comments" %}</a>
    {% if post.tags.all %}
    <!--tags-->
    <br/>{%trans "Tags" %}:
    {% for tag in post.tags.all %}
    <a href="{{tag.get_absolute_url}}">{{tag.name}}</a>{% if not forloop.last %},{% endif %}
    {% endfor %}
    {% endif %}
    </small>
    <br><br>
    <div style="color:#bfbfbf;"> 
        作者: <a style="color:#bfbfbf;" href="{% trans 'site-url' %}">Peigen</a> <span class="separator">|</span> 可以转载, 但必须以超链接形式标明文章原始出处和作者信息及<a style="color:#bfbfbf;" href="http://creativecommons.org/licenses/by/2.5/cn/">版权声明</a><br />
        </span>
        网址: <a style="color:#bfbfbf;" href="{% trans 'site-url' %}{{post.get_absolute_url}}">{% trans 'site-url' %}{{post.get_absolute_url}}</a> 
    </div>
    <p></p>
    <div class="postbg">
        {{post.content|markup:post.markup|safe}}
    </div>
    <div id="shareSth">
        <!-- JiaThis Button BEGIN -->
        <a href="http://www.jiathis.com/share.html" class="jiathis"><img src="http://www.jiathis.com/code/images/jiathis2.gif" width="125" height="21" border="0" id="jiathis_a"/></a>
        <script type="text/javascript" src="http://www.jiathis.com/code/jia.js" charset=utf-8></script>
        <!-- JiaThis Button END -->
        <!--TODO 订阅到QQ，未完成
        <a href="http://rc.qzone.qq.com/myhome/share/#action=post&url=http%3A%2F%2Fpeigen.info{{post.get_absolute_url}}&title={{post.title}}" target="_blank"><img src="{% media_url %}/images/qzone-logo.jpg" width="40" height="21" border="0" title="分享到QQ" alt="分享到QQ" /></a>
        <a href="http://peigen.info{{post.get_absolute_url|escape}}&title={{post.title|markup:post.markup|safe}}" >tt</a>
        -->
    </div>
    <div>
        <script type="text/javascript"><!--
        google_ad_client = "pub-3055576944788946";
        /* 内容页广告 */
        google_ad_slot = "2807256018";
        google_ad_width = 300;
        google_ad_height = 250;
        //-->
        </script>
        <script type="text/javascript"
        src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
        </script>
    </div>
    <br>
      <h2>相关文章</h2>
      {%get_tagged_posts post.tags.all 5 post.id%}
   </div>
 {% ifnotequal 0 post.comment_count %}   
    <!--Start of comments-->    
    <div id="comments">
        <span class="commenttitle"><a name="comments"></a>{% trans "Comments" %}</span>
        <ul>
        {% for cmt in post.get_comments%}
           <li class="{% cycle alt1,alt2,alt3 %}">
            <strong>{% if cmt.comment_author_url %}<a href="{{cmt.comment_author_url}}" target="_blank">{{cmt.comment_author}}</a>{% else %}{{cmt.comment_author}}{% endif %}</strong>
            <span class="byline">{% trans "Post at" %} {{cmt.comment_date|date:"Y-m-d H:i:s"}}</span>
           {{cmt.comment_content|linebreaks }}             
           </li>
        {% endfor %}
        </ul>
    </div>
 {% endifnotequal %}   
 {% ifequal "open" post.comment_status %}
        {% include "blog/comment_form.html" %}
{% endifequal %} 
    <!--End of comments-->
{% endblock %}
<!--End of content-->
